package org.javaboy.demo;

/**
 * @author Lyh
 * @date 2024/1/25 22:30
 * @desciption: 1
 */
public class Dog {
    private Integer age;
    private String color;
    private String name;

    public Dog(){
        //由于没有其他逻辑，所以在此处添加一下打印日志，然后验证一下spring容器是否注入dog对象
        System.out.println("hello dog!");
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        System.out.println("hello"+age);
        this.age = age;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        System.out.println("hello"+name);
        this.name = name;
    }

    @Override
    public String toString() {
        return "Dog{" +
                "age=" + age +
                ", color='" + color + '\'' +
                ", name='" + name + '\'' +
                '}';
    }
}
